/**
 * Created by Administrator on 2018/10/3 0003.
 */
$(function () {
    var h  = document.documentElement.clientHeight
    $("#page").height(h)
    $("#Main").height(h-50)
    log(h)
    window.onresize=function(){
        var h  = document.documentElement.clientHeight
        $("#page").height(h)
        $("#Main").height(h-50)
    }

    console.log(P._vue);
});
var pc = new PageConf();
pc.el = "#page";
pc.data = {
    isCollapse:false,
    sideBarClass:"sideBar",
    collapseTransition:false,
};
pc.func = {
    setCollapse:function() {
        this.isCollapse == true ? this.isCollapse = false :  this.isCollapse = true;
        this.isCollapse == false ? this.sideBarClass = "sideBar" :  this.sideBarClass = "";
        $(".logo").toggle()
    },
    handleSelect:function(key, keyPath) {
        log(key)
        log(keyPath)
        // if (url[key] != undefined) {
        //     $("#mainframe").attr("src",url[key]);
        // }
    },
    handleOpen:function(key, keyPath) {
        console.log(key, keyPath);
    },
    handleClose:function(key, keyPath) {
        console.log(key, keyPath);
    },
    open2:function() {
        this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
        }).then(() => {
            this.$message({
                type: 'success',
                message: '删除成功!'
            });
        }).catch(() => {
            this.$message({
                type: 'info',
                message: '已取消删除'
            });
        });
    }
}
var P = new Page(pc);